import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    isLogin: !!localStorage.getItem('isLogin') || false,
    audio: '',
    currentTime: '',
    running: false
  },
  mutations: {
    changeState(state, payload) {
      state.isLogin = payload;
    },
    setAudio(state, audio) {
      state.audio = audio
    },
    changeStatus(state, txt) {
      state.running = txt;
    }
  },
  actions: {
  },
  modules: {
  }
})
